import { createRouter, createWebHashHistory } from 'vue-router'
import { NOT_FOUND_ROUTE, basicRoutes as routes } from './routes'
import { App } from 'vue'

export const router = createRouter({
    history: createWebHashHistory('/'),
    routes,
    scrollBehavior: () => ({ left: 0, top: 0 }),
})

export function setupRouter(app: App) {
    router.addRoute(NOT_FOUND_ROUTE)
    app.use(router)
}